import { Role_1001 } from "../Item/Role/Role_1001";

export default class PlayerCenter{
    private static _instance: PlayerCenter = null;
    static get inst(): PlayerCenter{
        if(this._instance == null){
            this._instance = new PlayerCenter();
        }
        return this._instance;
    }

    private _roles: Array<string> = null;
    init(roles: Array<string> = ['Role_1001','Role_1002','Role_1002','Role_1001','Role_1002','Role_1002','Role_1001','Role_1002','Role_1002','Role_1001','Role_1002','Role_1002','Role_1001','Role_1002','Role_1002','Role_1001']){
        this._roles = roles || [];
    }

    get roles(){
        !this._roles && this.init();
        return this._roles;
    }
}